import { CustomerVO } from "../../customer/vos/customer.vo";
export interface SalesSearchVariantVO {
  id: string;
  code: string;
  productId: string;
  name: string;
  title: string;
  sku: string;
  isActive: string;
  soldPrice: number;
  promotionPrice: number;
  recTradeinPrice: number;
  minTradeinPrice: number;
  weight: number;
  createBy: string;
  qtyAvailable: number;
  qtySold: number;
  qtyLocked: number;
  avgCost: number;
  lastCost: number;
  categoryId: string;
  brandId: string;
  canTradein: string;
  hasSerialNumber: string;
}

export interface SNVO {
  id: string;
  name: string;
  status: string;
  lastCost: number;
  createTime: Date;
  variantId: string;
  variantName: string;
}

export interface PosSalesPayments {
  id: string;

  /** 销售订单 */
  salesId: string;

  /** 是否为退款 */
  isRefund: string;

  /** 支付方式 */
  method: string;

  /** 支付金额 */
  amount: number;

  /** 手续费 */
  subchargeAmount: number;

  /** 创建人id */
  employeeId: string;

  /** 逻辑删除 */
  delFlag: number;

  createTime: Date;
}

export interface PosSales {
  id: string;

  num: string;

  /** 订单状态 */
  status: string;

  /** 维修订单状态 */
  repairAssignStatus: string;

  /** 订单类型 */
  type: string;

  /** 下单日期 */
  orderDate: string; // 使用 ISO 格式的字符串表示日期，例如: 'yyyy-MM-ddTHH:mm:ss'

  /** 客户id */
  customerId: string;

  /** 门店id */
  branchId: string;

  /** 创建人id */
  employeeId: string;

  /** 不含税总额 */
  subtotal: number;

  /** 不含税退款金额 */
  subtotalRefund: number;

  /** 税 */
  tax: number;

  /** 退款税费 */
  taxRefund: number;

  /** 含税订单总额 */
  total: number;

  /** 含税退款总额 */
  totalRefund: number;

  /** 已支付金额 */
  paidAmount: number;

  /** 折扣类型 */
  discountType: string;

  /** 折扣比例 */
  discountPrecent: number;

  /** 折扣金额 */
  discountAmount: number;

  /** 手续费 */
  subchargeAmount: number;

  /** 备注 */
  note: string;

  /** 逻辑删除 */
  delFlag: number;

  createTime: Date;
}

export interface PosSalesItemSns {
  id: string;
  /** 销售订单ID */
  salesId: string;

  /** 销售订单明细ID */
  salesItemId: string;

  /** 序列号ID */
  snId: string;

  snName: string;

  /** 是否退款 */
  isRefund: string;

  /** 逻辑删除标志 */
  delFlag: number;
}

export interface SalesOrderItem {
  id: string;
  /** 销售订单ID */
  salesId: string;

  /** 产品ID */
  productId: string;

  /** SKU ID */
  variantId: string;

  /** SKU 名称 */
  name: string;

  /** 原价 */
  originPrice: number;

  /** 单价 */
  unitPrice: number;

  /** 成本价 */
  cost: number;

  /** 数量 */
  quantity: number;

  /** 退款数量 */
  quantityRefund: number;

  /** 不含税总额 */
  rowSubtotal: number;

  /** 不含税退款总额 */
  rowSubtotalRefund: number;

  /** 税费 */
  tax: number;

  /** 退款税费 */
  taxRefund: number;

  /** 含税总额 */
  rowTotal: number;

  /** 含税退款总额 */
  rowTotalRefund: number;

  /** 税配置ID */
  taxId: string;

  /** 逻辑删除标志 */
  delFlag: number;

  createTime: Date;

  sns: PosSalesItemSns[];

  hasSerialNumber: string;
}

export interface SalesOrderDetailVO {
  posSales: PosSales;
  posCustomer: CustomerVO;
  payments: PosSalesPayments[];
  items: SalesOrderItem[];
}

export interface SalesSearchSnVO {
  snId: string;
  snName: string;
  snStatus: string;
  variantId: string;
  variantName: string;
  sku: string;
  soldPrice: number;
  hasSerialNumber: string;
}
